package org.bigjava.novelplatform.common.constant;

import java.util.HashMap;

import static org.bigjava.novelplatform.common.constant.ComplexConstant.RESOURCE_PATH;

/**
 * 专门放一些经常复用的常量
 * @author ykh
 * @create 2022-03-23 22:42
 */
public interface NovelInfoConstant {
    /**
     * redis的key
     */
    static interface RedisKey {
        String CATALOG_ALL = "catalogAll";
        String BOOK_KEY_PREFIX = "book";
    }

    Long TOKEN_EXPIRE_MILLIS = 1000 * 60 * 60L;
    String SIGNATURE = "012345fwae0a)Jvaaw56ofjj03r.5g3[]fra_010p<U6789";
    String USER = "普通用户";
    String WRITER = "作家";
    String BOOK = "书籍";
    String VISIT = "Visit";
    String INTEGRAL = "Integral";
    String SUBSCRIPTION = "Subscription";
    String NEW_INTEGRAL = "NewIntegral";
    String DEFAULT_GROUP = "";


    /**
     * 映射的资源路径
     */
    String MAP_RESOURCE_PATH = "/resource";

    /**
     * url路径前缀
     */
    String RESOURCE_PREFIX = "http://localhost:8001"+MAP_RESOURCE_PATH;

    /**
     * 用户头像磁盘路径
     */
    String USER_HEAD_DISK_PATH = RESOURCE_PATH + "USER/HEAD/";

    /**
     * 用户头像url路径,在数库中存储
     */
    String USER_HEAD_URL_PATH = RESOURCE_PREFIX + "/USER/HEAD/";

    /**
     * 书籍封面磁盘路径
     */
    String BOOK_COVER_DISK_PATH = RESOURCE_PATH + "BOOK/COVER/";

    /**
     * 书籍头像url路径,在数库中存储
     */
    String BOOK_COVER_URL_PATH = RESOURCE_PREFIX + "/BOOK/COVER/";

    /**
     * 推广磁盘路径
     */
    String EXTENSION_DISK_PATH = RESOURCE_PATH + "/img/";

    /**
     * 推广url路径前缀
     */
    String EXTENSION_PREFIX = RESOURCE_PREFIX+"/img/";

    /**
     * 在session保存用户信息的key
     */
    String SESSION_USER = "user";
    /**
     * 最小等待时间
     */
    Long MIN_WAIT_TIME = 500L;
    /**
     * 验证码注册的前缀
     */
    String REGISTER_AUTH_CODE_PREFIX = "R";
    /**
     * 验证码修改密码的前缀
     */
    String RESET_PASSWORDS_AUTH_CODE_PREFIX = "RP";
    /**
     *  发送修改密码时的页面样式
     */
    String RESET_PASSWORDS_VIM = "resetPasswords.html";
    /**
     * 发送注册码时的页面样式
     */
    String REGISTER_VIM = "register.html";
    /**
     * 分类最大层级
     */
    Integer CATALOG_MAX_LEVEL = 2;
    /**
     * 分类最小层级
     */
    Integer CATALOG_MIN_LEVEL = 0;

    /**
     * 分隔符
     */
    Character SEPARATOR = '_';

    /**
     * 在session存储user的字符串
     */
    String ATTRIBUTE_USER = "user";

}
